<?php
/**
 * 店铺文章
 * User: E 房cms www.fangcms.com
 * Date: 2015/1/20
 * Time: 10:51
 */
namespace Home\Controller;
use Org\Yike\FangCms;
class StoreNewsController extends CommonController{
    public function _initialize(){
        parent::_initialize();
        $store_left = getStoreLeft();
        if(!$store_left['store']){
            $this->error('找不到对应的店铺信息');
        }
        $this->store = $store_left['store'];
        $this->store_user = $store_left['store_user'];
        $this->used_list = getUserUsedList($store_left['store']['user_id']);
        $this->hits = getStoreHits($store_left['store']['hits']);

    }

    public function index(){
        $FangCms = new FangCms();
        $FangCms->setInc($this->store['id'],'store');
        $this->page_arr = $FangCms->getNewsList(12,array('a.status'=>1,'a.user_id'=>$this->store['user_id']),true);
        $this->seoKey(array(
            'title'=>$this->store['name'].'原创文章,在线资讯'
        ));
        $this->display();
    }


}